package com.li.widget;

import android.content.Context;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.FrameLayout;
import android.widget.TextView;

import com.ndboo.reslibrary.R;


/**
 * Author: Li
 * Date: 2017/11/23 0023
 * Description:
 */

public class VerticalDoubleText extends FrameLayout {
    private TextView mTxtTitle;
    private TextView mTxtContent;
    public VerticalDoubleText(@NonNull Context context) {
        this(context,null);
    }

    public VerticalDoubleText(@NonNull Context context, @Nullable AttributeSet attrs) {
        super(context, attrs);
        init(context);
    }

    private void init(Context context) {
        View view= LayoutInflater.from(context).inflate(R.layout.layout_vertical_text,this);
        mTxtTitle=view.findViewById(R.id.txt_title);
        mTxtContent=view.findViewById(R.id.txt_content);
    }
    public void setTitle(String title){
        mTxtTitle.setText(title);
    }
    public void setContent(String content){
        mTxtContent.setText(content);
    }
}
